/*
 * Copyright 2008 Zoundry LLC, Inc.  All Rights Reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package org.zoundry.gaedt.core.models;

import java.lang.reflect.Method;

import javax.xml.namespace.QName;

/**
 * This interface is used to find the method to use to set an attribute or child
 * model.
 */
public interface IZGaeModelMutatorProvider
{
    /**
     * Finds a mutator on the given model for an attribute with the 
     * given QName.
     * 
     * @param aModel
     * @param aName
     * @param aValue
     */
    public Method getMutatorForAttribute(ZGaeModel aModel, QName aName, Object aValue);

    /**
     * Finds a mutator on the given parent model for adding the given
     * child model.
     * 
     * @param aModel
     * @param aElementName 
     * @param aParentModel
     */
    public Method getMutatorForChild(ZGaeModel aModel, QName aElementName, ZGaeModel aParentModel);

    /**
     * Finds a "value" mutator on the given model for the given model value.
     * 
     * @param aModel
     * @param aModelValue
     */
    public Method getMutatorForElementValue(ZGaeModel aModel, Object aModelValue);
}
